make needlessly global functions static and use NULL instead of 0 for pointer
authorvh249@arcadians.cl.cam.ac.uk <vh249@arcadians.cl.cam.ac.uk>
Fri, 12 Aug 2005 13:05:50 +0000 (13:05 +0000)
committervh249@arcadians.cl.cam.ac.uk <vh249@arcadians.cl.cam.ac.uk>
Fri, 12 Aug 2005 13:05:50 +0000 (13:05 +0000)
Signed-off-by: Vincent Hanquez <vincent@xensource.com>
tools/libxc/Makefile
tools/libxc/xc_core.c
tools/libxc/xc_linux_restore.c
tools/libxc/xc_linux_save.c
tools/libxc/xc_ptrace.c
tools/libxc/xc_vmx_build.c

index 81fcdc27501ee50a2023096c2a55acf6d317ca5c..41b024d273ebd4a2239840da3d45d976878da2c3 100644 (file)
@@ -7,7 +7,7 @@ INSTALL_DIR     = $(INSTALL) -d -m0755
 MAJOR    = 3.0
 MINOR    = 0
 
-CC       = gcc
+CC       = sparse
 
 XEN_ROOT = ../..
 include $(XEN_ROOT)/tools/Rules.mk
index a5468023cf091010a74bf4b4ede7691170e66327..df4352de1c322f3c8d0c10bdeaff8d24877c14d9 100644 (file)
@@ -43,7 +43,7 @@ xc_domain_dumpcore(int xc_handle,
                goto error_out;
        }
        
-       if ((dump_mem_start = malloc(DUMP_INCREMENT*PAGE_SIZE)) == 0) {
+       if ((dump_mem_start = malloc(DUMP_INCREMENT*PAGE_SIZE)) == NULL) {
                PERROR("Could not allocate dump_mem");
                goto error_out;
        }
index c4375c372e29a9b68deaeea0fe15aec1c752944e..67d5607e773bea7726922ab19bc00a9afcc56f0e 100644 (file)
@@ -32,7 +32,7 @@
 #define PPRINTF(_f, _a...)
 #endif
 
-ssize_t
+static ssize_t
 read_exact(int fd, void *buf, size_t count)
 {
     int r = 0, s;
index a66ada565d968211bdf047dc8ed879a25260b7d1..77349c88a330b9f28e94ee36a9436096aee2aac9 100644 (file)
@@ -136,7 +136,7 @@ static long long tv_to_us( struct timeval *new )
     return (new->tv_sec * 1000000) + new->tv_usec;
 }
 
-static long long llgettimeofday()
+static long long llgettimeofday( void )
 {
     struct timeval now;
     gettimeofday(&now, NULL);
@@ -312,9 +312,9 @@ static int analysis_phase( int xc_handle, u32 domid,
 }
 
 
-int suspend_and_state(int xc_handle, int io_fd,        int dom,              
-                      xc_dominfo_t *info,
-                      vcpu_guest_context_t *ctxt)
+static int suspend_and_state(int xc_handle, int io_fd, int dom,              
+                             xc_dominfo_t *info,
+                             vcpu_guest_context_t *ctxt)
 {
     int i=0;
     char ans[30];
index 2b53f460cf7dee1798f4113fb9034052a0f56e7d..fdeca60e2ef954336d6ebae59b8b863b78599a8b 100644 (file)
@@ -221,7 +221,7 @@ map_domain_va(unsigned long domid, int cpu, void * guest_va, int perm)
     return (void *)(((unsigned long)page_virt[cpu]) | (va & BSD_PAGE_MASK));
 
  error_out:
-    return 0;
+    return NULL;
 }
 
 int 
index ecd1d39b52d482e5e754e8ab561d40a75e770d83..f10cc8391c9e0386307e8f62681759c331d5280e 100644 (file)
@@ -624,7 +624,7 @@ static int setup_guest(int xc_handle,
 
 #define VMX_FEATURE_FLAG 0x20
 
-int vmx_identify(void)
+static int vmx_identify(void)
 {
     int eax, ecx;